function res = gauss(p,x)
%   res = p(1)*exp(-(x - p(2)).^2 ./ (2*p(3))) + x*p(4) + p(5);
    res = p(1)*exp(-(x - p(2)).^2 ./ (2*p(3).^2)) + p(4);
end